package com.dingding.service.user.facade.userinfo;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;

import com.dingding.common.core.base.dto.DubboInvokResponseDTO;
import com.dingding.facade.user.service.userinfo.IQueryUserInfoFacade;
import com.dingding.service.user.core.dao.IUserLoginDao;

/**
 * 
 * 用户信息查询类对外服务接口
 * 
 * @ClassName: QueryUserInfoFacadeImpl 
 * @author CHEHAUNBO 
 * @date 2016年4月23日 下午2:22:07
 * 
 */
@Component("queryUserInfoFacade")
public class QueryUserInfoFacadeImpl implements IQueryUserInfoFacade {

	@Resource(name = "userLoginDao")
	private IUserLoginDao userloginDao;

	/**
	 * 
	 * 获取当前城市所有用户手机号
	 * 
	 * @Title: getUserTelPhone 
	 * @param city 当前城市
	 * @return List<String> 当前用户手机号集合
	 * @author CHEHAUNBO
	 * 
	 */
	@Override
	public DubboInvokResponseDTO<List<String>> getUserTelPhone(String city) {

		DubboInvokResponseDTO<List<String>> baseQueryResponseDTO = new DubboInvokResponseDTO<List<String>>();

		if (StringUtils.isBlank(city)) {
			baseQueryResponseDTO.setCode(500);
			baseQueryResponseDTO.setErrorMessage("参数为空");
		}

		return userloginDao.getAllUserTelPhoneByCity(city);
	}

}
